#define _CRT_SECURE_NO_WARNINGS 1

#include "mylist.hpp"

int main()
{
	bit::list<int> list1;
	list1.push_back(1);
	list1.push_back(2);
	list1.push_back(3);
	list1.push_back(4);


	auto it = list1.begin();
	cout << "list1:";
	while (it != list1.end())
	{
		cout << *it << ' ';
		it++;
	}
	cout << endl;
	list1.push_back(5);


	bit::list<int> list2(list1);
	list2.push_back(6);
	cout << "list2:";
	for (auto e : list2)
	{
		cout << e << ' ';
	}
	cout << endl;


	bit::list<int> list3;
	list3 = list2;
	list3.pop_back();
	cout << "list3:";
	for (auto e : list3)
	{
		cout << e << ' ';
	}
	cout << endl;


	list3.clear();
	for (auto e : list3)
	{
		cout << e << ' ';
	}
	cout << endl;


	cout << list2.front() << endl;
	cout << list2.back() << endl;
}